<!doctype html>
<html>
	<head>
		<title>jQuery Mobile 初始化事件</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.css">
		<script src="https://apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
		<script src="https://apps.bdimg.com/libs/jquerymobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
		<link rel="shortcut icon" href="../favicon.ico">
		<script type="text/javascript">
			$(function(){
				var dbSize=2*1024*1024;
				db = openDatabase('firstDB', '', '', dbSize);
				db.transaction(function(tx) {
					tx.executeSql("CREATE TABLE IF NOT EXISTS customer (id integer PRIMARY KEY,name char(10),address varchar(200))", [], onSuccess, onError);
					tx.executeSql("DELETE FROM customer");
				}, function(e) {
					console.log("交易失败 ", e);
				}, function() {
					console.log("交易成功 ");
				});
				function onSuccess(tx, results) {
					$("div").html("打开数据库成功！");
				}
				function onError(e) {
					$("div").html("打开数据库错误"+e.mesage);
				}
			});
		</script>
	</head>
	<body>
		<div id="message">
			<h1>第一页</h1>	
		</div>
	</body>
</html>